package com.lht.cozyCloud.bee.utils;

import com.aliyuncs.DefaultAcsClient;
import com.aliyuncs.IAcsClient;
import com.aliyuncs.profile.DefaultProfile;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * @author lht
 * @version 1.0
 * @description: 短信连接
 * @date 2025/1/7 8:56
 */

@Configuration
public class ClientConfig {

//    public Client(IAcsClient aliClient) {
//        this.aliClient = aliClient;
//    }
//
//    private IAcsClient aliClient;

//    @Bean
//    public IAcsClient aliClient() {
//        DefaultProfile profile = DefaultProfile.
//                getProfile(Properties.REGION_Id,
//                        Properties.ACCESS_KEY_ID,
//                        Properties.SECRECT);
//        return new DefaultAcsClient(profile);
//    }
    @Bean
    public IAcsClient aliClient() {
        DefaultProfile profile = DefaultProfile.getProfile(Properties.REGION_Id, Properties.ACCESS_KEY_ID, Properties.SECRECT);
        return new DefaultAcsClient(profile);
    }
}
